package com.shiguiwu.springmybatis.designpattern.decorator;

/**
 * @description: sso实现，单点实现
 * @author: stone
 * @date: Created by 2021/8/27 9:59
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.designpattern.decorator
 */
public class SsoInterceptor implements HandlerInterceptor {
    @Override
    public boolean preHandle(String request, String response, Object handler) {

        //模拟获取票据
        String ticket = request.substring(1, 8);
        return "success".equals(ticket);
    }

}
